<?php
  //Buffer larger content areas like the main page content
  ob_start();
?>
<?php
	include("include/config.php");
	include("include/functions.php");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head >
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"/>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <!-- scheck:x1 -->
    <meta name="description" content="Online Shopping Store in India for Branded Shoes, Clothing &amp; Accessories for Men &amp; Women. Cash on Delivery, END OF SEASON SALE , Free Shipping, 30 day returns.">
    <meta name="keywords" content="Online Shopping India, Branded Shoes, Clothing, Accessories, Fashion wear, Sporting Goods, Branded apparel, Cool T-Shirts, T-shirt Designs,Footwear, Indian Team Jersey, IPL jerseys, Football jerseys, watches, kurtas, kurtis, formal wear, shirts, pants, t">
    <title>Online Shopping</title>
              
<script>
function watermark(inputId,text){
  var inputBox = document.getElementById(inputId);
    if (inputBox.value.length > 0){
      if (inputBox.value == text)
        inputBox.value = '';
    }
    else
      inputBox.value = text;
}

 function open_window(link,w,h) //opens new window
 {
  var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes,top=150px,left=350px";
  newWin = window.open(link,'newWin',win);
  newWin.focus();
 }
 function funsearch()
 {
 var x=document.getElementById('txtsearch').value;
if(x=="      Search By Product Name")
{
alert("Please Enter Search Name");
}
else
{
window.location=("productsbycat.php?pname=" +x);	
} 
 }
</script>


<style type="text/css">
#show_info{
	font-size:12px;
}
</style>


<link href="menu.css" rel="stylesheet" type="text/css">

        <script>
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-1752831-1']);
        _gaq.push(['_setDomainName', '.myntra.com']);
        var cdn_base = 'http://myntra.myntassets.com';
       var secure_cdn_base = 'https://d6kkp3rk1o2kk.cloudfront.net';
      var s_account= 'myntra-prod2';
        
        var Myntra = Myntra || {};
        Myntra.Data = Myntra.Data || {};
        
        Myntra.Data.userEmail = "";
        Myntra.Data.userFBId ="";
        Myntra.Data.socialAction = 'wishlist';
        Myntra.Data.nonFBRegCouponValue = "1000";
        Myntra.Data.fbRegCouponValue = "1500";
        Myntra.Data.token = "35c1a750151c8b3c15a9807872bcdcc2";
        Myntra.Data.showAutoSuggest = "1";
        Myntra.Data.showAdminAdditionalStyleDetails = "";
		Myntra.Data.cookiedomain = ".myntra.com";
	    Myntra.Data.cookieprefix = "";
        Myntra.Data.loginTimeout = 15000;
        Myntra.Data.enableGuestLogin = 0;
	Myntra.Data.configMode = "prod";
        Myntra.Data.enableSpy = 1;
       	Myntra.Data.spyId = "b96c01e1efc9610e037abd39e0a469b2";
        Myntra.Data.pageName="static";
        Myntra.Data.lazyElems = new Array();
        Myntra.Data.lazySeparator = "#!#";
        Myntra.Data.ServerCheck = "x1";
        Myntra.Data.EmailUUID = "";
        function myntrack(category, action, opt_label, opt_value, opt_noninteraction) {
            var args = Array.prototype.slice.call(arguments);
            if (args.length < 3) { return; }
            args.unshift('_trackEvent');
            _gaq.push(args);
        }
        </script>
    


	    	<script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>

  	
    <script>
        Remrkt = {}; Remrkt.vizury = {};
        Remrkt.vizury.uid = "";
    

    </script>
	<script>
Myntra.Data.pageName="home";
function addtocart(pid){
	//alert(pid);
		document.form1.productid.value=pid;
		document.form1.command.value='add';
		document.form1.submit();
	}
</script>
<script language="javascript">
	function validate(){
		var f=document.form1;
		if(f.name.value==''){
			alert('Your name is required');
			f.name.focus();
			return false;
		}
		f.command.value='update';
		f.submit();
	}
</script>

<script language="javascript">
	function del(pid){
		if(confirm('Do you really mean to delete this item')){
			document.form1.pid.value=pid;
			document.form1.command.value='delete';
			document.form1.submit();
		}
	}
	function clear_cart(){
		if(confirm('This will empty your shopping cart, continue?')){
			document.form1.command.value='clear';
			document.form1.submit();
		}
	}
	function update_cart(){
		document.form1.command.value='update';
		document.form1.submit();
	}


</script>
</head>
<body>
    <div class="mk-body">
    
    <div class="mk-wrapper">
   


        
	        <div class="mk-carousel-items">
	<!--<section class="mk-site-nav-wrapper">
	
	
	
	<?php include('menus.php'); ?>	
	
	
</section>-->
<div class="mk-clear"></div>
	<!-- My Myntra Container  -->
<div class="mk-mymyntra-items mk-saved-wrapper mk-hide rs-carousel"><ul class="gray"></ul></div>

<!-- Saved Items Container  -->
<div class="mk-saved-items mk-saved-wrapper mk-hide rs-carousel"><ul class="rs-carousel-runner"></ul></div>

<!-- Recent Items --> 
<div class="mk-recent-items mk-saved-wrapper mk-hide rs-carousel"><ul class="rs-carousel-runner"></ul></div>

<!-- Bag Items --> 
<div class="mk-bag-items mk-saved-wrapper mk-hide rs-carousel"><ul class="rs-carousel-runner"></ul></div></div>                
        
<?php
if(isset($_POST['exp_date']))
{
	require_once('anet_php_sdk/AuthorizeNet.php'); // Make sure this path is correct.
	$transaction = new AuthorizeNetAIM('6F5T3LnvH4E', '4K35DTkpZGw3p67M');
	$transaction->amount = $_POST['amount'];
	$transaction->card_num = $_POST['card_num'];
	$transaction->exp_date = $_POST['exp_date'];
	$transaction->last_name = $_POST['last_name'];
	
	$response = $transaction->authorizeAndCapture();
	
	if ($response->approved) {
		header("Location: thanku.php");
	}	
	$errors = array('card_num' => $response->error_message);
}

?>


<div class="mk-one-column home-page" >


<div style="width:500px; left:200px; position:relative">

					<? if(isset($errors)): ?>
						<dl class="dl-horizontal error">
							<? foreach ($errors as $key => $value) { ?>
								<dt><?=$key?></dt>
								<dd><?=$value?></dd>
							<? } ?>						
						</dl>
						<pre>
							<? print_r($response); ?>
						</pre>
					<? endif; ?>
					
					<form  class="form-horizontal" action="http://cs.newpaltz.edu/~N02557866/E_commerce/thirdparty.php" method="post">
					  <table width="100%" cellpadding="10px" cellspacing="10px"><tr><td width="51%">
								<label class="control-label" for="last_name">Name on Card:</label></td>
                                <td width="49%"><p>
                                  <input type="text" id="last_name" name="last_name" value="" />
                                  </p>
                                  <p><br />
                          </p></td></tr>
						<tr><td>		<label class="control-label" for="amount">Price:</label></td><td>
									<p>
									  <input type="text" id="amount" name="amount" value="<?php 		if(isset($_SESSION['cart']))
												{
															$x=	get_order_total();
															echo $x;
												}
												else
												{
													echo mysql_error();
													echo "empty";
												}
												?>" readonly="readonly" />
						  </p>
									<p><br />
					    </p></td></tr>
                             <tr><td>		<label class="control-label" for="card_num">Card Number:</label></td><td>
									<p>
									  <input type="tel" id="card_num" name="card_num" />
							   </p>
									<p><br />
					    </p></td></tr>
                              <tr><td>
								<label class="control-label" for="exp_date">Expiration Date:</label></td><td><p>
								  <input type="text" id="exp_date" name="exp_date" />
								  </p>
								  <p><br />
				        </p></td></tr>
                                <tr><td colspan="2" align="center">
								<input type="submit" value="&nbsp;&nbsp;Submit&nbsp;&nbsp;" class="btn btn-primary" /></td></tr></table>
                        </form>
                        </div>

</div>
        <ul class="mk-feature-page-touts mk-clear">
</ul> <!-- End .category-page-touts -->        	     	<footer class="mk-site-ft mk-cf" style="background-color:#666666; color:#FFFFFF">
<div class="mynt-footer">
	<hr class="main" />
    <div class="footer-content">
    	        <div class="mynt-links-block">
            <div class="mynt-footer-links">
            <table width="100%"><tr style="text-align:center"><td>
                <ul>
                    <li><strong>POLICES</strong></li>
                    						<li><a href="corporateoffers.php">corporate offers</a></li>
                                            <li><a href="privacy.php" >Privacy</a></li>
                                            <li><a href="returnpolicy.php" >Return Policy</a></li>
											
                   </ul>
                                                            
                                                            </td>
                   
                    
                      <td valign="top"><ul>
					
                    <li><strong class="mt20">PAYMENT METHODS</strong></li>
                    <li><a href="">Creadit Card</a></li>
                    <li><a href="">Debit Card</a></li>
                    <li><a href="" >NetBanking</a></li>
                    <li><a href="">Cash on Delivery</a></li>
                        </ul>
                    </td>     
                    
                    <td valign="top">
                    <ul>

                    <li><strong>Electron</strong></li>
                    <li><a href="login.php">Login/Sign up</a></li>
                    <li><a href="contactus.php" >Contact Us</a></li>
                </ul></td>
				<td><br /><br />
				<a href="" onclick="window.open('myfacebook.php','myfacebook','height=520,width=310')"><img src="img/fbfan.jpg" /></a>
				</td>
				
				</tr></table>
            </div>
            
        </div>
        <hr />
    	     
        
        <div class="mynt-text">
            <div class="mynt-foot-title">ABOUT Electron</div>
            Electron is India's premier online shopping site that offers customers and bulk buyers option to purchase unused, branded factory seconds, surplus, overstock, and refurbished products at the lowest prices – guaranteed . We have over 70 stores and plan to have over 100 within 6 months.  <br />
            Our products come with warranty and supported by a world class pan India services network.  We support multiple payment options when you look for amazing deals on all popular brand.  Electron is the destination for buyers who are looking for a reliable and trustworthy place to shop for killer deals on factory seconds.  By shopping with us you are also supporting the environment and a greener, healthier future for our kids as we strive to reduce waste that would have otherwise polluted the environment.  Come, shop with us today and be part of over 1 Million happy customers who have pledged to make a difference..<br>
        </div>
		
     
        <div class="mynt-copy-right">
            &copy; electron.com / All rights reserved
        </div>
            </div>
</div>

<div id="fb-root"></div>

<!-- @Footer-->


</footer>
        
    </div>
    </div>
   


    	<div id="cart-combo-overlay" class="cart-combo-overlay lightbox">
<div class="mod">
	<div class="hd">COMBO OFFER</div>
    <div class="bd clearfix">
    </div>
  	<div class="ft"></div>
</div>
</div>

	<div id="quick-look-mod" class="lightbox">
<div class="mod">
	<div class="hd"></div>
    <div class="bd clearfix">
    </div>
  	<div class="ft">
		<span class="cps">100% Original Products &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Free Shipping on Orders over Rs. 799 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cash on Delivery &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30-Day Returns</span>
  	</div>
</div>
</div>

            <script type="text/javascript" src="js/common-1354034304.js.jgz"></script>
        <script type="text/javascript" src="js/home-1354034304.js.jgz"></script>
    

    			<script language="JavaScript" type="text/javascript">

var omnistat = {"eVar24":"new-userType:new","pageName":"home","channel":"home","prop1":"home","prop2":"home","prop3":"home","eVar16":"logged out","eVar15":""};

s.pageName=omnistat.pageName;

s.server="";

s.channel=omnistat.channel;

s.pageType="";



/* Conversion Variables */

s.campaign=omnistat.campaign;

s.state="";

s.zip="";

s.events=omnistat.events;

s.products=omnistat.products;

s.purchaseID=omnistat.purchaseID;



for (var i in omnistat) {

	if (/(prop|eVar)\d+/.test(i)) {

		s[i] = omnistat[i];

	}

}



s.eVar1="";

s.eVar2="";



// Setting s to s_analytics global variable as s is getting unset by some peice of code b/w here 

// and afterOnLoad function call in custom.js

var s_analytics = s;

var s_analytics_firesync = false;

if(s_analytics_firesync) {

	s_analytics.t();

}

</script>



	
	 

    <!-- Google Code for Smart Pixel -->
        <noscript>
        <div style="display:inline;">
        <img height="1" width="1" style="border-style:none;" alt="" />
        </div>
        </noscript>


    <script type="text/javascript">
                            _gaq.push(["_setCustomVar", 1, "LoginSplash", "control", 1]);_gaq.push(["_setCustomVar", 5, "loginbox", "v3", 1]);_gaq.push(["_setCustomVar", 2, "boostedSearch", "control", 1]);/*MAB GA CALLS*/
        	_gaq.push(['_trackPageview']);
	_gaq.push(['_trackPageLoadTime']);
	</script>
    

	<script src="/skin2/js/json2.js" type="text/javascript"></script>

          <script type="text/javascript">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.src=(("http:"===document.location.protocol)?"http:":"https:")+"//"+"d1ros97qkrwjf5.cloudfront.net/42/eum/rum.js";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrfj","beacon-1.newrelic.com","8d69094dad","892343","NFwEMEVZCkcHAhcLXQ0WMxZeFxRYBxUFDUAOFgULWUwWWwoNBhBBTHEJCVJoBVMDIgwMRhFWCghSSkpEDhE=",0,111,new Date().getTime(),"","","","",""]);
</script>    

</body>
</html>
 <?php
  //Assign all Page Specific variables
  $pagemaincontent = ob_get_contents();
  ob_end_clean();
  $pagetitle = "Shopping";
  //Apply the template
  include("master.php");
?>
<?php ob_flush();
?>